﻿// Decompiled with JetBrains decompiler
// Type: UnityEngine.Experimental.Rendering.RayTracingAccelerationStructure
// Assembly: UnityEngine.CoreModule, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null
// MVID: E6AE6B5A-2752-4B07-9528-C8B77C62CE79
// Assembly location: C:\Users\windys\Unity\2021.3.39f1c1\Editor\Data\Managed\UnityEngine\UnityEngine.CoreModule.dll
// XML documentation location: C:\Users\windys\Unity\2021.3.39f1c1\Editor\Data\Managed\UnityEngine\UnityEngine.CoreModule.xml

using System;
using System.Runtime.CompilerServices;
using UnityEngine.Bindings;

#nullable disable
namespace UnityEngine.Experimental.Rendering
{
  /// <summary>
  ///   <para>A data structure used to represent the Renderers in the Scene for GPU ray tracing.</para>
  /// </summary>
  public sealed class RayTracingAccelerationStructure : IDisposable
  {
    internal IntPtr m_Ptr;

    ~RayTracingAccelerationStructure() => this.Dispose(false);

    /// <summary>
    ///   <para>Destroys this RayTracingAccelerationStructure.</para>
    /// </summary>
    public void Dispose()
    {
      this.Dispose(true);
      GC.SuppressFinalize((object) this);
    }

    private void Dispose(bool disposing)
    {
      if (disposing)
        RayTracingAccelerationStructure.Destroy(this);
      this.m_Ptr = IntPtr.Zero;
    }

    public RayTracingAccelerationStructure(
      RayTracingAccelerationStructure.RASSettings settings)
    {
      this.m_Ptr = RayTracingAccelerationStructure.Create(settings);
    }

    /// <summary>
    ///   <para>Creates a RayTracingAccelerationStructure with the given RayTracingAccelerationStructure.RASSettings.</para>
    /// </summary>
    /// <param name="settings">Defines whether a RayTracingAccelerationStructure is updated by the user or the Engine, and whether to mask certain object layers or RayTracingModes.</param>
    public RayTracingAccelerationStructure()
    {
      this.m_Ptr = RayTracingAccelerationStructure.Create(new RayTracingAccelerationStructure.RASSettings()
      {
        rayTracingModeMask = RayTracingAccelerationStructure.RayTracingModeMask.Everything,
        managementMode = RayTracingAccelerationStructure.ManagementMode.Manual,
        layerMask = -1
      });
    }

    [FreeFunction("RayTracingAccelerationStructure_Bindings::Create")]
    private static IntPtr Create(RayTracingAccelerationStructure.RASSettings desc)
    {
      return RayTracingAccelerationStructure.Create_Injected(ref desc);
    }

    [FreeFunction("RayTracingAccelerationStructure_Bindings::Destroy")]
    [MethodImpl(MethodImplOptions.InternalCall)]
    private static extern void Destroy(RayTracingAccelerationStructure accelStruct);

    /// <summary>
    ///   <para>Additional resources: RayTracingAccelerationStructure.Dispose.</para>
    /// </summary>
    public void Release() => this.Dispose();

    /// <summary>
    ///   <para>Builds this RayTracingAccelerationStructure on the GPU.</para>
    /// </summary>
    /// <param name="relativeOrigin"></param>
    public void Build() => this.Build(Vector3.zero);

    /// <summary>
    ///   <para>Updates the transforms of all instances in this RayTracingAccelerationStructure.</para>
    /// </summary>
    [Obsolete("Method Update has been deprecated. Use Build instead (UnityUpgradable) -> Build()", true)]
    public void Update() => this.Build(Vector3.zero);

    /// <summary>
    ///   <para>Builds this RayTracingAccelerationStructure on the GPU.</para>
    /// </summary>
    /// <param name="relativeOrigin"></param>
    [FreeFunction(Name = "RayTracingAccelerationStructure_Bindings::Build", HasExplicitThis = true)]
    public void Build(Vector3 relativeOrigin) => this.Build_Injected(ref relativeOrigin);

    [FreeFunction(Name = "RayTracingAccelerationStructure_Bindings::Update", HasExplicitThis = true)]
    [Obsolete("Method Update has been deprecated. Use Build instead (UnityUpgradable) -> Build(*)", true)]
    public void Update(Vector3 relativeOrigin) => this.Update_Injected(ref relativeOrigin);

    /// <summary>
    ///   <para>Adds a ray tracing instance associated with a Renderer to this RayTracingAccelerationStructure.</para>
    /// </summary>
    /// <param name="targetRenderer">The Renderer to add to the RayTracingAccelerationStructure.</param>
    /// <param name="subMeshMask">A bool array of any size that indicates whether or not to add a sub-mesh to the RayTracingAccelerationStructure. For a Renderer with multiple sub-meshes, if subMeshMask[i] = true, Unity adds the sub-mesh to the RayTracingAccelerationStructure. For a Renderer with only one sub-mesh, you may pass an uninitialized array as a default value.</param>
    /// <param name="subMeshTransparencyFlags">A bool array of any size that indicates whether a given sub-mesh is transparent or opaque. For a Renderer with multiple sub-meshes, if subMeshTransparencyFlag[i] = true, Unity marks that sub-mesh as transparent. For a Renderer with only one sub-mesh, pass an array with a single initialized entry to indicate whether or not the one sub-mesh is transparent.
    /// When a ray-triangle intersection test succeeds for a sub-meshes that is marked as transparent, the GPU invokes an any hit shader.</param>
    /// <param name="enableTriangleCulling">A bool that indicates whether front/back face culling for this ray tracing instance is enabled. The culling takes place when the GPU performs a ray-triangle intersection test. Culling is enabled (true) by default.</param>
    /// <param name="frontTriangleCounterClockwise">A bool that indicates whether to flip the way triangles face in this ray tracing instance. If this is set to true, front-facing triangles will become back-facing and vice versa. Set to false by default.</param>
    /// <param name="mask">An 8-bit mask you can use to selectively intersect the ray tracing instance associated with the target Renderer with rays that only pass the mask. All rays are enabled (0xff) by default.</param>
    /// <param name="aabbBuffer">A GraphicsBuffer that defines a number of axis-aligned bounding boxes (AABBs). An AABB is defined by a list of bounds, written as floats in the following order: minX, minY, minZ, maxX, maxY, maxZ.</param>
    /// <param name="numElements">The number of axis-aligned bounding boxes defined in the given GraphicsBuffer.</param>
    /// <param name="material">The Material to apply to an instance defined by axis-aligned bounding boxes in a GraphicsBuffer.</param>
    /// <param name="instanceTransform">The object to world matrix to apply to an instance defined by axis-aligned bounding boxes in a GraphicsBuffer. This is optional, and takes the value of a Matrix4x4.identity by default.</param>
    /// <param name="isCutOff">A bool that indicates whether the Material applied to a GraphicsBuffer instance has cutoff transparency.</param>
    /// <param name="reuseBounds">A bool that indicates whether Unity reuses the AABBs defined in the GraphicsBuffer without change. If the exact same bounds can be used across multiple acceleration structures or multiple frames, set this to true. This is false by default.</param>
    /// <param name="subMeshFlags">A list of flags that control the shader execution behaviour when a ray intersects a sub-mesh geometry. See RayTracingSubMeshFlags for additional information.</param>
    /// <param name="id">An optional instance ID value that can be accessed using InstanceID() HLSL function.</param>
    [FreeFunction(Name = "RayTracingAccelerationStructure_Bindings::AddInstanceDeprecated", HasExplicitThis = true)]
    [MethodImpl(MethodImplOptions.InternalCall)]
    public extern void AddInstance(
      [NotNull("ArgumentNullException")] Renderer targetRenderer,
      bool[] subMeshMask = null,
      bool[] subMeshTransparencyFlags = null,
      bool enableTriangleCulling = true,
      bool frontTriangleCounterClockwise = false,
      uint mask = 255,
      uint id = 4294967295);

    /// <summary>
    ///   <para>Adds a ray tracing instance associated with a Renderer to this RayTracingAccelerationStructure.</para>
    /// </summary>
    /// <param name="targetRenderer">The Renderer to add to the RayTracingAccelerationStructure.</param>
    /// <param name="subMeshMask">A bool array of any size that indicates whether or not to add a sub-mesh to the RayTracingAccelerationStructure. For a Renderer with multiple sub-meshes, if subMeshMask[i] = true, Unity adds the sub-mesh to the RayTracingAccelerationStructure. For a Renderer with only one sub-mesh, you may pass an uninitialized array as a default value.</param>
    /// <param name="subMeshTransparencyFlags">A bool array of any size that indicates whether a given sub-mesh is transparent or opaque. For a Renderer with multiple sub-meshes, if subMeshTransparencyFlag[i] = true, Unity marks that sub-mesh as transparent. For a Renderer with only one sub-mesh, pass an array with a single initialized entry to indicate whether or not the one sub-mesh is transparent.
    /// When a ray-triangle intersection test succeeds for a sub-meshes that is marked as transparent, the GPU invokes an any hit shader.</param>
    /// <param name="enableTriangleCulling">A bool that indicates whether front/back face culling for this ray tracing instance is enabled. The culling takes place when the GPU performs a ray-triangle intersection test. Culling is enabled (true) by default.</param>
    /// <param name="frontTriangleCounterClockwise">A bool that indicates whether to flip the way triangles face in this ray tracing instance. If this is set to true, front-facing triangles will become back-facing and vice versa. Set to false by default.</param>
    /// <param name="mask">An 8-bit mask you can use to selectively intersect the ray tracing instance associated with the target Renderer with rays that only pass the mask. All rays are enabled (0xff) by default.</param>
    /// <param name="aabbBuffer">A GraphicsBuffer that defines a number of axis-aligned bounding boxes (AABBs). An AABB is defined by a list of bounds, written as floats in the following order: minX, minY, minZ, maxX, maxY, maxZ.</param>
    /// <param name="numElements">The number of axis-aligned bounding boxes defined in the given GraphicsBuffer.</param>
    /// <param name="material">The Material to apply to an instance defined by axis-aligned bounding boxes in a GraphicsBuffer.</param>
    /// <param name="instanceTransform">The object to world matrix to apply to an instance defined by axis-aligned bounding boxes in a GraphicsBuffer. This is optional, and takes the value of a Matrix4x4.identity by default.</param>
    /// <param name="isCutOff">A bool that indicates whether the Material applied to a GraphicsBuffer instance has cutoff transparency.</param>
    /// <param name="reuseBounds">A bool that indicates whether Unity reuses the AABBs defined in the GraphicsBuffer without change. If the exact same bounds can be used across multiple acceleration structures or multiple frames, set this to true. This is false by default.</param>
    /// <param name="subMeshFlags">A list of flags that control the shader execution behaviour when a ray intersects a sub-mesh geometry. See RayTracingSubMeshFlags for additional information.</param>
    /// <param name="id">An optional instance ID value that can be accessed using InstanceID() HLSL function.</param>
    public void AddInstance(
      Renderer targetRenderer,
      RayTracingSubMeshFlags[] subMeshFlags,
      bool enableTriangleCulling = true,
      bool frontTriangleCounterClockwise = false,
      uint mask = 255,
      uint id = 4294967295)
    {
      this.AddInstanceSubMeshFlagsArray(targetRenderer, subMeshFlags, enableTriangleCulling, frontTriangleCounterClockwise, mask, id);
    }

    /// <summary>
    ///   <para>Removes a ray tracing instance associated with a Renderer from this RayTracingAccelerationStructure.</para>
    /// </summary>
    /// <param name="targetRenderer">The Renderer to remove from the RayTracingAccelerationStructure.</param>
    [FreeFunction(Name = "RayTracingAccelerationStructure_Bindings::RemoveInstance", HasExplicitThis = true)]
    [MethodImpl(MethodImplOptions.InternalCall)]
    public extern void RemoveInstance([NotNull("ArgumentNullException")] Renderer targetRenderer);

    /// <summary>
    ///   <para>Adds a ray tracing instance associated with a Renderer to this RayTracingAccelerationStructure.</para>
    /// </summary>
    /// <param name="targetRenderer">The Renderer to add to the RayTracingAccelerationStructure.</param>
    /// <param name="subMeshMask">A bool array of any size that indicates whether or not to add a sub-mesh to the RayTracingAccelerationStructure. For a Renderer with multiple sub-meshes, if subMeshMask[i] = true, Unity adds the sub-mesh to the RayTracingAccelerationStructure. For a Renderer with only one sub-mesh, you may pass an uninitialized array as a default value.</param>
    /// <param name="subMeshTransparencyFlags">A bool array of any size that indicates whether a given sub-mesh is transparent or opaque. For a Renderer with multiple sub-meshes, if subMeshTransparencyFlag[i] = true, Unity marks that sub-mesh as transparent. For a Renderer with only one sub-mesh, pass an array with a single initialized entry to indicate whether or not the one sub-mesh is transparent.
    /// When a ray-triangle intersection test succeeds for a sub-meshes that is marked as transparent, the GPU invokes an any hit shader.</param>
    /// <param name="enableTriangleCulling">A bool that indicates whether front/back face culling for this ray tracing instance is enabled. The culling takes place when the GPU performs a ray-triangle intersection test. Culling is enabled (true) by default.</param>
    /// <param name="frontTriangleCounterClockwise">A bool that indicates whether to flip the way triangles face in this ray tracing instance. If this is set to true, front-facing triangles will become back-facing and vice versa. Set to false by default.</param>
    /// <param name="mask">An 8-bit mask you can use to selectively intersect the ray tracing instance associated with the target Renderer with rays that only pass the mask. All rays are enabled (0xff) by default.</param>
    /// <param name="aabbBuffer">A GraphicsBuffer that defines a number of axis-aligned bounding boxes (AABBs). An AABB is defined by a list of bounds, written as floats in the following order: minX, minY, minZ, maxX, maxY, maxZ.</param>
    /// <param name="numElements">The number of axis-aligned bounding boxes defined in the given GraphicsBuffer.</param>
    /// <param name="material">The Material to apply to an instance defined by axis-aligned bounding boxes in a GraphicsBuffer.</param>
    /// <param name="instanceTransform">The object to world matrix to apply to an instance defined by axis-aligned bounding boxes in a GraphicsBuffer. This is optional, and takes the value of a Matrix4x4.identity by default.</param>
    /// <param name="isCutOff">A bool that indicates whether the Material applied to a GraphicsBuffer instance has cutoff transparency.</param>
    /// <param name="reuseBounds">A bool that indicates whether Unity reuses the AABBs defined in the GraphicsBuffer without change. If the exact same bounds can be used across multiple acceleration structures or multiple frames, set this to true. This is false by default.</param>
    /// <param name="subMeshFlags">A list of flags that control the shader execution behaviour when a ray intersects a sub-mesh geometry. See RayTracingSubMeshFlags for additional information.</param>
    /// <param name="id">An optional instance ID value that can be accessed using InstanceID() HLSL function.</param>
    public void AddInstance(
      GraphicsBuffer aabbBuffer,
      uint numElements,
      Material material,
      bool isCutOff,
      bool enableTriangleCulling = true,
      bool frontTriangleCounterClockwise = false,
      uint mask = 255,
      bool reuseBounds = false,
      uint id = 4294967295)
    {
      this.AddInstance_Procedural(aabbBuffer, numElements, material, Matrix4x4.identity, isCutOff, enableTriangleCulling, frontTriangleCounterClockwise, mask, reuseBounds, id);
    }

    /// <summary>
    ///   <para>Adds a ray tracing instance associated with a Renderer to this RayTracingAccelerationStructure.</para>
    /// </summary>
    /// <param name="targetRenderer">The Renderer to add to the RayTracingAccelerationStructure.</param>
    /// <param name="subMeshMask">A bool array of any size that indicates whether or not to add a sub-mesh to the RayTracingAccelerationStructure. For a Renderer with multiple sub-meshes, if subMeshMask[i] = true, Unity adds the sub-mesh to the RayTracingAccelerationStructure. For a Renderer with only one sub-mesh, you may pass an uninitialized array as a default value.</param>
    /// <param name="subMeshTransparencyFlags">A bool array of any size that indicates whether a given sub-mesh is transparent or opaque. For a Renderer with multiple sub-meshes, if subMeshTransparencyFlag[i] = true, Unity marks that sub-mesh as transparent. For a Renderer with only one sub-mesh, pass an array with a single initialized entry to indicate whether or not the one sub-mesh is transparent.
    /// When a ray-triangle intersection test succeeds for a sub-meshes that is marked as transparent, the GPU invokes an any hit shader.</param>
    /// <param name="enableTriangleCulling">A bool that indicates whether front/back face culling for this ray tracing instance is enabled. The culling takes place when the GPU performs a ray-triangle intersection test. Culling is enabled (true) by default.</param>
    /// <param name="frontTriangleCounterClockwise">A bool that indicates whether to flip the way triangles face in this ray tracing instance. If this is set to true, front-facing triangles will become back-facing and vice versa. Set to false by default.</param>
    /// <param name="mask">An 8-bit mask you can use to selectively intersect the ray tracing instance associated with the target Renderer with rays that only pass the mask. All rays are enabled (0xff) by default.</param>
    /// <param name="aabbBuffer">A GraphicsBuffer that defines a number of axis-aligned bounding boxes (AABBs). An AABB is defined by a list of bounds, written as floats in the following order: minX, minY, minZ, maxX, maxY, maxZ.</param>
    /// <param name="numElements">The number of axis-aligned bounding boxes defined in the given GraphicsBuffer.</param>
    /// <param name="material">The Material to apply to an instance defined by axis-aligned bounding boxes in a GraphicsBuffer.</param>
    /// <param name="instanceTransform">The object to world matrix to apply to an instance defined by axis-aligned bounding boxes in a GraphicsBuffer. This is optional, and takes the value of a Matrix4x4.identity by default.</param>
    /// <param name="isCutOff">A bool that indicates whether the Material applied to a GraphicsBuffer instance has cutoff transparency.</param>
    /// <param name="reuseBounds">A bool that indicates whether Unity reuses the AABBs defined in the GraphicsBuffer without change. If the exact same bounds can be used across multiple acceleration structures or multiple frames, set this to true. This is false by default.</param>
    /// <param name="subMeshFlags">A list of flags that control the shader execution behaviour when a ray intersects a sub-mesh geometry. See RayTracingSubMeshFlags for additional information.</param>
    /// <param name="id">An optional instance ID value that can be accessed using InstanceID() HLSL function.</param>
    public void AddInstance(
      GraphicsBuffer aabbBuffer,
      uint numElements,
      Material material,
      Matrix4x4 instanceTransform,
      bool isCutOff,
      bool enableTriangleCulling = true,
      bool frontTriangleCounterClockwise = false,
      uint mask = 255,
      bool reuseBounds = false,
      uint id = 4294967295)
    {
      this.AddInstance_Procedural(aabbBuffer, numElements, material, instanceTransform, isCutOff, enableTriangleCulling, frontTriangleCounterClockwise, mask, reuseBounds, id);
    }

    [FreeFunction(Name = "RayTracingAccelerationStructure_Bindings::AddInstance", HasExplicitThis = true)]
    private void AddInstance_Procedural(
      [NotNull("ArgumentNullException")] GraphicsBuffer aabbBuffer,
      uint numElements,
      [NotNull("ArgumentNullException")] Material material,
      Matrix4x4 instanceTransform,
      bool isCutOff,
      bool enableTriangleCulling = true,
      bool frontTriangleCounterClockwise = false,
      uint mask = 255,
      bool reuseBounds = false,
      uint id = 4294967295)
    {
      this.AddInstance_Procedural_Injected(aabbBuffer, numElements, material, ref instanceTransform, isCutOff, enableTriangleCulling, frontTriangleCounterClockwise, mask, reuseBounds, id);
    }

    /// <summary>
    ///   <para>Updates the transform of the instance associated with the Renderer passed as argument.</para>
    /// </summary>
    /// <param name="renderer"></param>
    [FreeFunction(Name = "RayTracingAccelerationStructure_Bindings::UpdateInstanceTransform", HasExplicitThis = true)]
    [MethodImpl(MethodImplOptions.InternalCall)]
    public extern void UpdateInstanceTransform([NotNull("ArgumentNullException")] Renderer renderer);

    /// <summary>
    ///   <para>Updates the instance mask of a ray tracing instance associated with the Renderer passed as argument.</para>
    /// </summary>
    /// <param name="renderer"></param>
    /// <param name="mask"></param>
    [FreeFunction(Name = "RayTracingAccelerationStructure_Bindings::UpdateInstanceMask", HasExplicitThis = true)]
    [MethodImpl(MethodImplOptions.InternalCall)]
    public extern void UpdateInstanceMask([NotNull("ArgumentNullException")] Renderer renderer, uint mask);

    /// <summary>
    ///   <para>Updates the instance ID of a ray tracing instance associated with the Renderer passed as argument.</para>
    /// </summary>
    /// <param name="renderer"></param>
    /// <param name="instanceID"></param>
    [FreeFunction(Name = "RayTracingAccelerationStructure_Bindings::UpdateInstanceID", HasExplicitThis = true)]
    [MethodImpl(MethodImplOptions.InternalCall)]
    public extern void UpdateInstanceID([NotNull("ArgumentNullException")] Renderer renderer, uint instanceID);

    /// <summary>
    ///   <para>Returns the total size of this RayTracingAccelerationStructure on the GPU in bytes.</para>
    /// </summary>
    [FreeFunction(Name = "RayTracingAccelerationStructure_Bindings::GetSize", HasExplicitThis = true)]
    [MethodImpl(MethodImplOptions.InternalCall)]
    public extern ulong GetSize();

    /// <summary>
    ///   <para>Returns the number of ray tracing instances in the acceleration structure.</para>
    /// </summary>
    [FreeFunction(Name = "RayTracingAccelerationStructure_Bindings::GetInstanceCount", HasExplicitThis = true)]
    [MethodImpl(MethodImplOptions.InternalCall)]
    public extern uint GetInstanceCount();

    [FreeFunction(Name = "RayTracingAccelerationStructure_Bindings::AddInstanceSubMeshFlagsArray", HasExplicitThis = true)]
    [MethodImpl(MethodImplOptions.InternalCall)]
    private extern void AddInstanceSubMeshFlagsArray(
      [NotNull("ArgumentNullException")] Renderer targetRenderer,
      RayTracingSubMeshFlags[] subMeshFlags,
      bool enableTriangleCulling = true,
      bool frontTriangleCounterClockwise = false,
      uint mask = 255,
      uint id = 4294967295);

    [MethodImpl(MethodImplOptions.InternalCall)]
    private static extern IntPtr Create_Injected(
      ref RayTracingAccelerationStructure.RASSettings desc);

    [MethodImpl(MethodImplOptions.InternalCall)]
    private extern void Build_Injected(ref Vector3 relativeOrigin);

    [MethodImpl(MethodImplOptions.InternalCall)]
    private extern void Update_Injected(ref Vector3 relativeOrigin);

    [MethodImpl(MethodImplOptions.InternalCall)]
    private extern void AddInstance_Procedural_Injected(
      GraphicsBuffer aabbBuffer,
      uint numElements,
      Material material,
      ref Matrix4x4 instanceTransform,
      bool isCutOff,
      bool enableTriangleCulling = true,
      bool frontTriangleCounterClockwise = false,
      uint mask = 255,
      bool reuseBounds = false,
      uint id = 4294967295);

    /// <summary>
    ///   <para>An enum controlling which RayTracingAccelerationStructure.RayTracingModes a Renderer must have in order to be added to the RayTracingAccelerationStructure.</para>
    /// </summary>
    [Flags]
    public enum RayTracingModeMask
    {
      /// <summary>
      ///   <para>Disable adding Renderers to this RayTracingAccelerationStructure.</para>
      /// </summary>
      Nothing = 0,
      /// <summary>
      ///   <para>Only add Renderers with RayTracingMode.Static set to the RayTracingAccelerationStructure.</para>
      /// </summary>
      Static = 2,
      /// <summary>
      ///   <para>Only add Renderers with RayTracingMode.DynamicTransform set to the RayTracingAccelerationStructure.</para>
      /// </summary>
      DynamicTransform = 4,
      /// <summary>
      ///   <para>Only add Renderers with RayTracingMode.DynamicGeometry set to the RayTracingAccelerationStructure.</para>
      /// </summary>
      DynamicGeometry = 8,
      /// <summary>
      ///   <para>Add all Renderers to the RayTracingAccelerationStructure except for those with that have RayTracingMode.Off.</para>
      /// </summary>
      Everything = DynamicGeometry | DynamicTransform | Static, // 0x0000000E
    }

    /// <summary>
    ///   <para>Defines whether Unity updates a RayTracingAccelerationStructure automatically, or if the user updates it manually via API.</para>
    /// </summary>
    public enum ManagementMode
    {
      /// <summary>
      ///   <para>Gives user control over populating and updating the RayTracingAccelerationStructure.</para>
      /// </summary>
      Manual,
      /// <summary>
      ///   <para>Automatically populates and updates the RayTracingAccelerationStructure.</para>
      /// </summary>
      Automatic,
    }

    /// <summary>
    ///   <para>Defines whether a RayTracingAccelerationStructure is updated by the user or by the Engine, and whether to mask certain object layers or RayTracingModes.</para>
    /// </summary>
    public struct RASSettings(
      RayTracingAccelerationStructure.ManagementMode sceneManagementMode,
      RayTracingAccelerationStructure.RayTracingModeMask rayTracingModeMask,
      int layerMask)
    {
      /// <summary>
      ///   <para>An enum that selects whether a RayTracingAccelerationStructure is automatically or manually updated.</para>
      /// </summary>
      public RayTracingAccelerationStructure.ManagementMode managementMode = sceneManagementMode;
      /// <summary>
      ///   <para>An enum controlling which RayTracingModes a Renderer must have in order to be added to the RayTracingAccelerationStructure.</para>
      /// </summary>
      public RayTracingAccelerationStructure.RayTracingModeMask rayTracingModeMask = rayTracingModeMask;
      /// <summary>
      ///   <para>A 32-bit mask that controls which layers a GameObject must be on in order to be added to the RayTracingAccelerationStructure.</para>
      /// </summary>
      public int layerMask = layerMask;
    }
  }
}
